<?php

namespace app\task\controller;
use app\common\service\message\Basics;
use app\common\model\User as UserModel;

class Task extends \think\Controller
{
    /* @var \app\task\model\Order $model */
    private $model;

    /**
     * 构造方法
     * Order constructor.
     */
    public function __construct()
    {
        $this->model = new UserModel;
    }

    /**
     * 生日提醒功能
     * @param int $deadlineTime
     * @param array $where
     * @return bool
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     * @throws \Exception
     */
    public function birthdayMsg()
    {
       $today = date("m-d",time());
       $data = UserModel::where('date_format(birth_date,"%m-%d")="'.$today.'"')->select()->toArray();
       $Basics = new Basics();
       foreach($data as $item){
        // 发送信息
       }
       return $data;
    }
   

}